package 寒假刷题;

public class 唯一元素的和 {
    public int sumOfUnique(int[] nums) {
        int[] ints = new int[101];
        for (int num : nums){
            ints[num]++;
        }
        int sum = 0;
        for (int i = 1; i < 101; i++) {
            if (ints[i]==1)
                sum+=i;
        }
        return sum;
    }
}
